{namespace lfe=SGalinski\Lfeditor\ViewHelpers}

<h2 class="uppercase">
	<f:translate key="select.langfile" />
</h2>
<div>
	<strong>
		{extensionLabel}
	</strong>
</div>
<f:be.menus.actionMenu>
	<f:for each="{extensions}" as="extension" key="extAddress">
		<lfe:be.menus.actionMenuOptionGroup label="{extension.extLabel}">
			<f:for each="{extension.languageFileOptions}" as="langFileLabel" key="langFileOption">
				<lfe:extendedIf condition="{extAddress} == {extensionSelection}"
					and="{langFileOption} == {languageFileSelection}">
					<f:then>
						<f:be.menus.actionMenuItem label="{langFileLabel}"
							controller="{controllerName}"
							action="changeSelection"
							arguments="{extensionSelection: extAddress, languageFileSelection: langFileOption}"
							additionalAttributes="{selected: 'selected'}" />
					</f:then>
					<f:else>
						<f:be.menus.actionMenuItem label="{langFileLabel}"
							controller="{controllerName}"
							action="changeSelection"
							arguments="{extensionSelection: extAddress, languageFileSelection: langFileOption}" />
					</f:else>
				</lfe:extendedIf>
			</f:for>
		</lfe:be.menus.actionMenuOptionGroup>
	</f:for>
</f:be.menus.actionMenu>

<f:form id="refreshLanguageFileListForm" action="refreshLanguageFileList" class="tx-lfeditor-inline-block-form">
	<span class="tx-lfeditor-buttons">
		<button class="tx-lfeditor-buttons-refresh">
			<span title="{f:translate(key:'button.refreshLanguageFileList.title')}" class="t3-icon t3-icon-actions t3-icon-system-refresh"></span>
		</button>
	</span>
</f:form>
